hysop.backend.hardware.pci_ids module¶
- class hysop.backend.hardware.pci_ids.PCIIds(path=None, url=None)[source]¶
Bases:
object
Class used to parse all pci.ids entries. This file should contains up to date PCI vendors and device ids.
The default path that is looked is ‘/usr/share/hwdata/pci.ids’ See http://pciids.sourceforge.net/ to get urls.
It can be updated using the command ‘update-pciids’, or by providing a custom source file or url in constructor.
- Usage:
from hysop.backend.topology import PCIIds pciids = PCIIds(filepath or url)
#PCI DEVICES pciids.vendors[vendor_id]
.devices[device_id] .subdevices[subdevice_id]
#PCI DEVICE CLASSES pciids.device_classes[class_id]
.device_subclasses[subclass_id] .programming_interfaces[interface_id]
All ids can be given as hexadecimal strings or as integers.
Loads and parse a pci.ids file. The file may be compressed in gzip or bzip2 format. url has priority over path.
- class hysop.backend.hardware.pci_ids.PciDeviceSubClass(device_subclass, device_class)[source]¶
Bases:
object